Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lint and format with pre-commit #534

Merged
merged 6 commits into from
Jun 6, 2023
Merged

Lint and format with pre-commit #534

merged 6 commits into from
Jun 6, 2023

Conversation

MattF-NSIDC
Copy link

@MattF-NSIDC MattF-NSIDC commented Jun 5, 2023

Description

Switch to running linters and formatters with pre-commit

Checklist

If an item on this list is done or not needed, simply check it with [x].

  • Config lockfile updated (inv config.export > qgreenland/config/cfg-lock.json)
  • Version bumped if needed (bumpversion (major|minor|patch|prerelease|build)
  • CHANGELOG.md updated
  • Documentation updated if needed
  • New unit tests if needed

@MattF-NSIDC MattF-NSIDC changed the title Pre commit Lint and format with pre-commit Jun 5, 2023
@MattF-NSIDC MattF-NSIDC force-pushed the pre-commit branch 2 times, most recently from 40d4f1f to 4439749 Compare June 5, 2023 23:43
@trey-stafford
Copy link
Contributor

Nice. The first time I tried running a commit this took a while (and since I'm using magit I got no real feedback until the pre-commit processes were complete...maybe that's something I can tweak), but subsequent tests appeared to run quickly.

🤞 no more "lint 🔔" commits 😆

Add GitHub actions test & build workflow
@MattF-NSIDC
Copy link
Author

That's expected. First commit has to fetch down the dependencies (sometimes it's a docker container, sometimes it's a Python package), but it also caches them for next time. Pre-commit will also run its checks only on changed files at hook-time to minimize time consumed, so expect it to take a bit longer if you use --all-files as well, especially shellcheck.

@MattF-NSIDC MattF-NSIDC merged commit e4fc9f8 into main Jun 6, 2023
@MattF-NSIDC MattF-NSIDC deleted the pre-commit branch June 6, 2023 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants